using System;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
using UnityEngine;

namespace JEngine.Framework
{
    public class EngineHelper
    {
       
        #region 得到唯一UID

        private int _sn = 0;

       
        public long GenerateUID(string pre = "")
        {
            if (_sn == 1000)
            {
                _sn = 0;
            }
            else
            {
                _sn++;
            }

            return long.Parse(pre + DateTimeOffset.UtcNow.ToUnixTimeSeconds() + _sn.ToString().PadLeft(3, '0'));
        }

        #endregion

        #region 得到当前系统时间

        public string TimeNowStr()
        {
            return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
        }

        #endregion


        
        
      

       
    }
}